//
//  BKPhoneCollectionCell.m
//  bestkeep
//
//  Created by yons on 16/11/30.
//  Copyright © 2016年 utouu. All rights reserved.
//

#import "BKPhoneCollectionCell.h"


@implementation BKPhoneCollectionCell


-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        [self initViews];
    }
    return self;
}

-(void)initViews{
    _bigTitleLabel = [[UILabel alloc]init];
    _bigTitleLabel.font = UIFontLarge;
    _bigTitleLabel.textAlignment = NSTextAlignmentCenter;
    [self addSubview:_bigTitleLabel];
    [_bigTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self.mas_centerY).offset(-10);
        make.centerX.mas_equalTo(self.mas_centerX);
        make.width.mas_equalTo(self.mas_width);
        make.height.mas_equalTo(16);
    }];
    
    _smallTitleLabel = [[UILabel alloc]init];
    _smallTitleLabel.font = UIFontSmall;
    _smallTitleLabel.textAlignment = NSTextAlignmentCenter;
    [self addSubview:_smallTitleLabel];
    [_smallTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self.mas_centerY).offset(10);
        make.centerX.mas_equalTo(self.mas_centerX);
        make.width.mas_equalTo(self.mas_width);
        make.height.mas_equalTo(12);
    }];
    
    _preferentialImageView = [[UIImageView alloc]init];
    _preferentialImageView.userInteractionEnabled = YES;
    _preferentialImageView.image = ResourceImage(@"BKPhone_九折");
    [self addSubview:_preferentialImageView];
    [_preferentialImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.mas_top).mas_offset(0.5f);
        make.right.mas_equalTo(self.mas_right).mas_offset(-0.5f);
        make.width.mas_equalTo(35);
        make.height.mas_equalTo(35.0f*117.0f/128);
    }];
    
}


@end
